#include<bits/stdc++.h>
using namespace std;
int n,a[100005],x,ans,maxn;
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	scanf("%d",&n);
	for(int i=1;i<=n;i++){scanf("%d",&x);a[x]++;maxn=max(maxn,x);}
	for(int i=1;i<=n;i++){
		int tmp=a[i],tmpid=i;
		while(tmp&&tmpid){
			a[--tmpid]-=min(tmp,a[tmpid]);
			tmp-=min(tmp,a[tmpid]);
		}
	}
	for(int i=1;i<=n;i++) ans+=a[i];
	printf("%d",ans);
	fclose(stdin);
	fclose(stdout);
	return 0;
}
